home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Windows Magazine WinPak Multimedia CD
/
Windows Magazine WinPak Multimedia CD.iso
/
wmlaunch.txt
< prev
Wrap
Text File
|
1995-04-06
|
3KB
|
88 lines
While *WINDOWS Magazine* has gone to great lengths to make sure
that this file's description of WMLAUNCH.DLL and WMLAUNCH.EXE
is as accurate as possible, we do not guarantee that any
or all of the functions described
will work properly on all systems all the time, and therefore
offer the advice "as-is" without warranty or guarantee as to
merchantability or suitability to task. Your use of this
software is at your own risk.
If you aren't sure of the suitability to task of software
or advice on this CD-ROM, or are uncertain about your
ability to install and operate it, seek additional
advice before proceeding.
In any case, CMP Publications Inc., its employees or
freelancers are not responsible for any injury,
damage or loss resulting from your use of this disk
or the information it contains.
Using the WMLAUNCH.DLL
The routine call is also named WMLaunch. It takes
just one parameter: a null-terminated string which is the
full pathname for the file (drive, path and filename).
For example:
WMLaunch ("C:\mydir\myfile.xxx")
The WMLaunch routine finds the application associated
with that file extension in WIN.INI and launches it.
The app is launched directing it to open the file. If
an error occurs it is reported to the user in a message box.
A return value greater than 32 is a success, and in that
case the return value is the instance handle of the launched
application. Any other return is a failure. The defined error
codes are:
0 The system is out of memory, the executable file was corrupt
or relocations were invalid.
2 Can't find the file.
3 Can't find the path (directory) of the file.
5 There is a sharing error or network protection error with the file.
6 A DLL designed for a future version of Windows is trying to run.
8 There isn't enough system memory to run the application.
10 The application won't run on this Windows version.
11 The application .EXE file can't be read (it is either a non-Windows
app or it is corrupt).
12 The application was designed for a different operating system.
13 The application is a DOS 4 app.
14 The application is a real-mode app.
16 Windows can't run multiple instances of the app (because
of the size of its data segment).
19 The executable file is compressed and must be decompressed before
it can run.
20 A DLL that is trying to run is corrupt.
21 The application requires Windows 32-bit extensions.
31 There is no association in WIN.INI for this type of file.
WMLAUNCH.EXE
You can run this app with a full filename on the command line.
For example:
WMLAUNCH C:\MYDIR\MYFILE.XXX
The WMLaunch app will find the application associated with the
file extension in WIN.INI and launch the app, directing it to
open the file. If an error occurs, WMLaunch reports the error
to the user in a message box.
The WMLaunch app exits after launching the app (and reporting errors,
if any). WMLaunch doesn't have any windows of its own (that is, the
user will never see any evidence that WMLaunch is running).